<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_qddjgz.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_qddjgz.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_qddjgz_id',
                footer: "Foots",
                cnName: '财务汇总渠道定价规则',
                name: 'djlc/cw_djlc_qddjgz',
                url: "/cw_djlc_qddjgz/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"channelname":"","promotion":"","eventpromotion":"","lianhetong":"","otherway":"","businesspercent":""});
            const editFormOptions = ref([[{"title":"渠道","field":"channelname"}],
                              [{"title":"促销","field":"promotion","type":"decimal"}],
                              [{"title":"活动促销","field":"eventpromotion","type":"decimal"}],
                              [{"title":"联合通","field":"lianhetong","type":"decimal"}],
                              [{"title":"其他","field":"otherway","type":"decimal"}],
                              [{"title":"商务","field":"businesspercent","type":"decimal"}]]);
            const searchFormFields = ref({"channelname":""});
            const searchFormOptions = ref([[{"title":"渠道","field":"channelname","type":"like"}]]);
            const columns = ref([{field:'channelname',title:'渠道',type:'string',width:110,align:'left',sort:true},
                       {field:'promotion',title:'促销',type:'decimal',width:110,align:'left'},
                       {field:'eventpromotion',title:'活动促销',type:'decimal',width:110,align:'left'},
                       {field:'lianhetong',title:'联合通',type:'decimal',width:110,align:'left'},
                       {field:'otherway',title:'其他',type:'decimal',width:110,align:'left'},
                       {field:'businesspercent',title:'商务',type:'decimal',width:110,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'status',title:'状态',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'cw_djlc_qddjgz_id',title:'定价流程渠道定价规则',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
